package com.fuhe.chen.vendingmachine.dao;

import com.fuhe.chen.vendingmachine.dto.cond.AdvertisementCond;
import com.fuhe.chen.vendingmachine.pojo.Advertisement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AdvertisementDao {

    /**
     * 添加广告信息
     * @param advertisement
     */
    void addAdvertisement(Advertisement advertisement);

    /**
     * 删除广告信息
     * @param advertisementId
     */
    void deleteAdvertisement(@Param("id") Integer advertisementId);

    /**
     * 修改广告信息
     * @param advertisement
     */
    void updateAdvertisement(Advertisement advertisement);

    /**
     * 查询所有广告信息
     */
    List<Advertisement> findAll();

    /**
     * 查询单个广告信息
     * @param advertisementId
     */
    Advertisement findOne(@Param("id") Integer advertisementId);

    /**
     * 根据条件查询广告信息
     * @param
     */

    List<Advertisement> findByCondition(AdvertisementCond advertisementCond);
}
